package cn.wolfcode.p2p.mgrsite.util;

import java.util.concurrent.Executor;
import java.util.concurrent.Executors;

import org.springframework.scheduling.annotation.SchedulingConfigurer;
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
import org.springframework.stereotype.Component;

@Component
public class ScheduledConfig implements SchedulingConfigurer {
	@Override
	public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
		Executor threadExecutor = Executors.newScheduledThreadPool(3);
		taskRegistrar.setScheduler(threadExecutor);
	}
}